package com.sskj.b70.p.fragment;

import com.lzy.okrx2.adapter.FlowableBody;
import com.sskj.b70.m.StockCoinBean;
import com.sskj.b70.m.bean.HttpData;
import com.sskj.b70.m.http.JsonConverter;
import com.sskj.b70.p.base.BasePresenter;
import com.sskj.b70.v.fragment.MarketListHangqingFragment;

import java.util.List;

import io.reactivex.Flowable;

/**
 * Created by Lee on 2018/2/28 0028.
 */
public class MarketHangqingFragmentPst extends BasePresenter<MarketListHangqingFragment> {
    public Flowable<List<StockCoinBean>> getData(String code) {
        return httpService.getProduct(code)
                .converter(new JsonConverter<HttpData<List<StockCoinBean>>>() {})
                .adapt(new FlowableBody<>())
                .map(HttpData::getData);
    }


}
